const allData=[
  {area:"天津市",name:"天津和光精密模具有限公司",lng:117.30903,lat:39.04823},
  {area:"河北省保定市",name:"长城汽车股份有限公司",lng:115.468255,lat:38.822763},
  {area:"江苏省常州市",name:"皮尔磁电子（常州）有限公司",lng:119.6662,lat:31.743787},
  {area:"江苏省泰州市",name:"长城汽车泰州生产基地",lng:119.919442,lat:32.279184},
  {area:"江苏省泰州市",name:"蓝思旺精密（泰州）有限公司",lng:119.875171,lat:32.420329},
  {area:"江苏省苏州市",name:"苏州金辉模具有限公司",lng:120.513251,lat:31.241549},
  {area:"湖南省长沙市",name:"天能电池",lng:113.043648,lat:28.198596},
  {area:"广东省佛山市",name:"顺德恒鼎工业园",lng:113.335301,lat:22.767129},
  {area:"四川省成都市",name:"立邦涂料成都有限公司",lng:104.238534,lat:30.55075},
  {area:"四川省成都市",name:"南山汽车文创产业园",lng:104.246985,lat:30.551956},
  {area:"四川省成都市",name:"四川龙威金属制品有限公司",lng:104.248723,lat:30.546124},
  {area:"重庆市",name:"重庆怡铃汽车销售服务有限公司",lng:106.525844,lat:29.611011},
  {area:"重庆市",name:"重庆双英汽车座椅有限公司",lng:106.769738,lat:29.677898},
  {area:"重庆市",name:"重庆宏立至信科技发展集团有限公司",lng:106.740884,lat:29.640087},
  {area:"重庆市",name:"重庆宏华唯实达汽车部件有限公司",lng:106.742126,lat:29.640015},
  {area:"重庆市",name:"韩泰轮胎公司鱼嘴工厂",lng:106.758055,lat:29.639585},
  {area:"重庆市",name:"平伟科技集团公司",lng:106.660622,lat:29.627},
  {area:"重庆市",name:"金海科技园",lng:106.661711,lat:29.63133},
  {area:"重庆市",name:"长安汽车鱼嘴乘车用车基地",lng:106.767431,lat:29.649728},
  {area:"重庆市",name:"长安汽车渝北模具工厂",lng:106.648948,lat:29.762959},
  {area:"重庆市",name:"重庆市巴南区庆江机电制品有限公司",lng:106.50265,lat:29.388302},
  {area:"重庆市",name:"江津珞璜工业园",lng:106.467134,lat:29.323102}
]

export const getAreaData=(area)=> {
  let list=[];
  for (let i = 0; i < allData.length; i++) {
    let data = allData[i];
    if (data.area == area) {
      list.push({
        radius:6,color:"red",
        title:data.name,
        center:[data.lat,data.lng]
      });
    }
  }
  return list;
}


export const getAreaPoint=(area)=> {
  let list=[];
  for (let i = 0; i < allData.length; i++) {
    let data = allData[i];
    if (data.area == area) {
      list.push(data);
    }
  }
  return list;
}